AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)
-AC_ARG_WITH(systemd,
- AS_HELP_STRING([--with-systemd],
- [Add systemd support]),
- [with_systemd=$withval], [with_systemd=auto])
-
-PKG_CHECK_MODULES(SYSTEMD,
- [libsystemd-login libsystemd-daemon],
- [have_systemd=yes], [have_systemd=no])
-
-if test "x$with_systemd" = "xauto" ; then
- if test x$have_systemd = xno ; then
- use_systemd=no
- else
- use_systemd=yes
- fi
-else
- use_systemd=$with_systemd
-fi
-
-if test "x$use_systemd" = "xyes"; then
- if test "x$have_systemd" = "xno"; then
- AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
- fi
-
- AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
-fi
-
GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
</interface>;
const ConsoleKitSessionIface = <interface name='org.freedesktop.ConsoleKit.Session'>
-<method name='IsActive'>
- <arg type='b' direction='out' />
-</method>
-<signal name='ActiveChanged'>
- <arg type='b' direction='out' />
-</signal>
<signal name='Lock' />
<signal name='Unlock' />
</interface>;
return this._currentSession;
},
- get sessionActive() {
- return Shell.session_is_active_for_systemd();
- },
-
canPowerOff: function(asyncCallback) {
this._proxy.CanPowerOffRemote(function(result, error) {
if (error)
return this._currentSession;
},
- get sessionActive() {
- if (this._sessionActive !== undefined)
- return this._sessionActive;
-
- let session = this.getCurrentSessionProxy();
- session.connectSignal('ActiveChanged', Lang.bind(this, function(object, senderName, [isActive]) {
- this._sessionActive = isActive;
- }));
- [this._sessionActive] = session.IsActiveSync();
-
- return this._sessionActive;
- },
-
canPowerOff: function(asyncCallback) {
this._proxy.CanStopRemote(function(result, error) {
if (error)
gnome_shell_cflags = \
$(GNOME_SHELL_CFLAGS) \
- $(SYSTEMD_CFLAGS) \
-I$(srcdir)/tray \
-DVERSION=\"$(VERSION)\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
libgnome_shell_la_LIBADD = \
-lm \
$(GNOME_SHELL_LIBS) \
- $(SYSTEMD_LIBS) \
$(BLUETOOTH_LIBS) \
libst-1.0.la \
libtray.la \
#include <langinfo.h>
#endif
-#ifdef WITH_SYSTEMD
-#include <systemd/sd-daemon.h>
-#include <systemd/sd-login.h>
-#endif
-
static void
stop_pick (ClutterActor *actor,
const ClutterColor *color)
return contents;
}
-/**
- * shell_session_is_active_for_systemd:
- *
- * Checks whether the session we are running in is currently active,
- * i.e. in the foreground and ready for user input.
- *
- * Returns: TRUE if session is active
- */
-gboolean
-shell_session_is_active_for_systemd (void)
-{
- /* If this isn't systemd, let's assume the session is active. */
-
-#ifdef WITH_SYSTEMD
- if (sd_booted () <= 0)
- return TRUE;
-
- return sd_session_is_active (NULL) != 0;
-#else
- return TRUE;
-#endif
-}
-
/**
* shell_util_wifexited:
* @status: the status returned by wait() or waitpid()
char *shell_get_file_contents_utf8_sync (const char *path,
GError **error);
-gboolean shell_session_is_active_for_systemd (void);
-
gboolean shell_util_wifexited (int status,
int *exit);